/*
编写带有接口和抽象类的标准Javabean类
我们现在有乒乓球运动员和篮球运动员，乒乓球教练和篮球教练。
为了出国交流，跟乒乓球相关的人员都需要学习英语。
请用所有知识分析，在这个案例中，哪些是具体类，哪些是抽象类，哪些是接口?
乒乓球运动员:姓名，年龄，学打乒乓球，说英语
篮球运动员:姓名，年龄，学打篮球
乒乓球教练:姓名，年龄，教打乒乓球，说英语
篮球教练:姓名，年龄，教打篮球
 */
public class A55 {
    public static void main(String[] args) {
        PingPongPlayer ppp = new PingPongPlayer("张三",23);
        System.out.println(ppp.getName()+","+ppp.getAge());
        ppp.Study();
        ppp.SpeakEnglish();
        PingPongCoach ppc = new PingPongCoach("李四",26);
        System.out.println(ppc.getName()+","+ppc.getAge());
        ppc.Teach();
        ppc.SpeakEnglish();
        BasketBallPlayer bbp = new BasketBallPlayer("王五",21);
        System.out.println(bbp.getName()+","+bbp.getAge());
        bbp.Study();
        BasketBallCoach bbc = new BasketBallCoach("张六",26);
        System.out.println(bbc.getName()+","+bbc.getAge());
        bbc.Teach();
    }
}
class person{
    private String name;
    private int age;
    public person() {
    }
    public person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
}
abstract class Player extends person{
    public Player() {
    }
    public Player(String name, int age) {
        super(name, age);
    }
    public abstract void Study();
}
abstract class Coach extends person{
    public Coach() {
    }
    public Coach(String name, int age) {
        super(name, age);
    }
    public abstract void Teach();
}
interface English{
    public abstract void SpeakEnglish();
}
class PingPongPlayer extends Player implements English{
    public PingPongPlayer() {
    }
    public PingPongPlayer(String name, int age) {
        super(name, age);
    }
    @Override
    public void Study() {
        System.out.println("学打乒乓球");
    }
    @Override
    public void SpeakEnglish() {
        System.out.println("说英语");
    }
}
class PingPongCoach extends Coach implements English{
    public PingPongCoach() {
    }
    public PingPongCoach(String name, int age) {
        super(name, age);
    }
    @Override
    public void Teach() {
        System.out.println("教打乒乓球");
    }
    @Override
    public void SpeakEnglish() {
        System.out.println("说英语");
    }
}
class BasketBallPlayer extends Player{
    public BasketBallPlayer() {
    }
    public BasketBallPlayer(String name, int age) {
        super(name, age);
    }
    @Override
    public void Study() {
        System.out.println("学打篮球");
    }
}
class BasketBallCoach extends Coach{
    public BasketBallCoach() {
    }
    public BasketBallCoach(String name, int age) {
        super(name, age);
    }
    @Override
    public void Teach() {
        System.out.println("教打篮球");
    }
}
